import request from '@/utils/request'
const baseURL = process.env.VUE_APP_BASE_URL
import qs from 'qs'
export function submitMerge(data) {
    return request({
        url: baseURL + '/superlink/api/mergeFormula/submit',
        method: 'post',
        data
    })
}
export function formulaList(params) {
    return request({
        url: baseURL + `/superlink/api/mergeFormula/list?${qs.stringify(params, { indices: false })}`,
        method: 'get',
    })
}
export function revoke(token) {
    return request({
        url: baseURL + `/superlink/api/mergeFormula/cancel/${token}`,
        method: 'post',
        data: {}
    })
}
export function formulaDetails(token) {
    return request({
        url: baseURL + `/superlink/api/mergeFormula/byToken/${token}`,
        method: 'get',
    })
}
export function formulaCut(data, token) {
    return request({
        url: baseURL + `/superlink/api/mergeFormula/cut//${token}`,
        method: 'post',
        data
    })
}
export function postSplit(data, token) {
    return request({
        url: baseURL + `/superlink/api/mergeFormula/split/${token}`,
        method: 'post',
        data
    })
}
export function delFormula(token) {
    return request({
        url: baseURL + `/superlink/api/mergeFormula/delete/${token}`,
        method: 'delete',
    })
}

export function putFormula(data, token) {
    return request({
        url: baseURL + `/superlink/api/mergeFormula/update/${token}`,
        method: 'put',
        data
    })
}
